export default {
	methods: {
		// 全局loading加载方法
		$setLoading(params) {
			const _params = {
				lock: true,
				text: '正在加载数据，请稍等...',
				spinner: 'el-icon-loading',
				background: 'rgba(0, 0, 0, 0.5)',
				color: '#fff',
				customClass: 'global-loading'
			}
			const config = Object.assign({}, _params, params)
			const loading = this.$loading(config)
			return loading
		},
		// 复制成功
		clipboardSuccess() {
			this.$message({
				message: '复制成功',
				type: 'success',
				duration: 1500
			})
		}
	}
}